//cl_dhlite_quicknotice.lua

dhlite_dat.qn = {}
dhlite_dat.qn.cBarColor = Color( 000, 189, 000, 150 )
dhlite_dat.qn.cTextColor = Color( 255, 255, 255, 255 )
dhlite_dat.qn.cBackground = Color( 000, 000, 000, 150 )

dhlite_dat.qn.Font = "DHLITE_Instruction"

dhlite_dat.qn.Y = - 32

dhlite_dat.qn.bHidden = false
dhlite_dat.qn.fSpawn = CurTime()
dhlite_dat.qn.fRemain = 6

function dhlite.NoticeHUDPaint( )
	if dhlite_dat.qn.bHidden then return end
	
	local shouldStop = CurTime() > (dhlite_dat.qn.fSpawn + dhlite_dat.qn.fRemain )

	local r, n, s, x, t
	
	surface.SetFont( dhlite_dat.qn.Font )
	s = DHLITE_NAME .. " has successfully loaded. Use the command \"dhlite_menu\" to call the menu. _______ You can now enable Developer mode in the menu."
	t = "You will get automatic updates from the Cloud as the addon is being developed."
	t = "You're using Cloud Loader Version v" .. tostring(dhlite_cloudloader_version or "<unknown>")
	if dhlite_internal ~= nil then
		local MY_VERSION, ONLINE_VERSION, DOWNLOAD_LINK = dhlite_internal.GetVersionData()
		t = t .. ", and using Locale Version v" .. MY_VERSION .. "."
		if ONLINE_VERSION == -1 then
			t = t .. " Yet the Cloud server couldn't be reached."
			
		elseif ONLINE_VERSION == MY_VERSION then
			t = t .. " which is the latest DepthHUD Lite release."
			
		else
			t = t .. " Most recent DepthHUD Lite is v" .. ONLINE_VERSION .. "."
		
		
		end
		
	else
		t = t .. ", and using Cloud Version."
	
	end
	
	r, n = surface.GetTextSize( s )
	
	dhlite_dat.qn.Y = math.Approach( dhlite_dat.qn.Y, shouldStop and (- n * 2) or 0, RealFrameTime( ) * n * 3 )
	
	x = ScrW( ) * .5	
	
	surface.SetDrawColor( dhlite_dat.qn.cBackground.r, dhlite_dat.qn.cBackground.g, dhlite_dat.qn.cBackground.b, dhlite_dat.qn.cBackground.a )
	surface.DrawRect( 0, dhlite_dat.qn.Y, ScrW( ), n * 2 )
	
	draw.DrawText( s, dhlite_dat.qn.Font, x, dhlite_dat.qn.Y, dhlite_dat.qn.cTextColor, TEXT_ALIGN_CENTER )
	draw.DrawText( t, dhlite_dat.qn.Font, x, dhlite_dat.qn.Y + n, dhlite_dat.qn.cTextColor, TEXT_ALIGN_CENTER )
	
	if shouldStop and dhlite_dat.qn.Y <= (-n * 2) then
		dhlite_dat.qn.bHidden = true
		
	else
		dhlite_dat.qn.bHidden = false
		
	end
	
end
